/**
 * 生产环境配置
 *
 * 最终生效的配置为 prod + default（前者覆盖后者）
 */


module.exports = app => {
  const exports = {};

  exports.sequelize = {
    datasources: [
      {
        delegate: 'model',
        baseDir: 'model',
        dialect: 'mysql',

        host: '',
        port: '3306',

        database: 'live',
        username: 'live',
        password: '',
        pool: {
          max: 5,
          min: 0,
          idle: 10000,
        },
        timezone: '+08:00',
      },
      {
        delegate: 'spider',
        baseDir: 'model_spider',
        dialect: 'mysql',

        host: '',
        port: '3306',

        database: 'spider',
        username: 'spider',
        password: '',
        pool: {
          max: 1000,
          min: 0,
          idle: 10000,
        },
        timezone: '+08:00',
      },
    ],
  };

  return exports;
};
